package gml.android.politeia.order;

import java.util.ArrayList;
import android.util.Log;

/** Interface to call generic {@link Order} to customized {@link android.widget.ArrayAdapter}*/
public abstract class Order {
	
	/** Info about View to be used in instatiation of {@link Order}*/
	public final static int TYPE_UNKNOW = 0xe45db;

	/** Used with {@link Log} to identify thread in Debug mode*/
	private static final String TAG = "Order";
	
	/** Identify which type of order used
	 * @see {@link TYPE_UNKNOW} {@link TYPE_EDIT_FIELD}*/
	protected int mOrder;
	
	/** get the type of order
	 * @see {@link TYPE_BUTTON}, {@link TYPE_SIMPLE_FADER}, 
	 * {@link TYPE_COMPLEX_FADER}, {@link TYPE_EDIT}, {@link TYPE_UNKNOW}
	 * @return the order type*/
	public int getOrder(){
		return this.mOrder;
	}
	
	/** set the type of order
	 * @see {@link TYPE_BUTTON}, {@link TYPE_SIMPLE_FADER}, 
	 * {@link TYPE_COMPLEX_FADER}, {@link TYPE_EDIT}, {@link TYPE_UNKNOW}
	 * @return the order type*/
	public void setOrder(int typeOrder) {
		Log.d(TAG, "Setting order: "+typeOrder);
		switch (typeOrder) {
			default: mOrder = TYPE_UNKNOW; break;
		}	
	}
	
	public abstract String getAction();

	public static ArrayList<Order> generateOrders(int type, int howMuch) {
		Log.d(TAG, "Generating ArrayList<Order>: "+type+" / much:"+howMuch);
		ArrayList<Order> orders = new ArrayList<Order>();
		
		switch (type) {
			default: return null;
		}
	}
}
